<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/



Event::listen('illuminate.query',function($query) {
	// var_dump($query);
});




// 设置中间件
	Route::group(['middleware' => 'login'],function(){
		// 后台首页
		Route::get('/admin','admin\AdminController@index');

		// 用户
		Route::controller('/admin/user','admin\UserController');

		// 商品类别
		Route::controller('/admin/type','admin\TypeController');

		// 商品
		Route::controller('/admin/goods','admin\GoodsController');

		//头部导航栏
		Route::controller('/admin/topNav','admin\TopNavController');

		//右侧导航栏
		Route::controller('/admin/rightNav','admin\RightNavController');

		//底部导航栏
		Route::controller('/admin/bottomNav','admin\BottomNavController');

		//友情链接模块
		Route::controller('/admin/friendLink','admin\FriendLinkController');

		//网站配置模块
		Route::controller('/admin/config','admin\ConfigController');

		// banner模块
		Route::controller("/admin/banner","admin\BannerController");

		// 热搜词汇模块
		Route::controller("/admin/hotkeywords","admin\HotkeywordsController");

		// 推荐区模块
		Route::controller("/admin/recommend","admin\RecommendController");

		// 广告区模块
		Route::controller("/admin/adver","admin\AdverController");
	});
// 后台登录
Route::controller('/admin/login','admin\LoginController');
